-
Notifications
You must be signed in to change notification settings - Fork 5k
[beatreceivers] fix race condition in beat LoadMeta #46844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[beatreceivers] fix race condition in beat LoadMeta #46844
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
5e0930e
to
439c766
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
439c766
to
be310b9
Compare
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test fails if you go back to using just os.OpenFile
so this fixes things as expected 👍
* fix race condition in beat LoadMeta (cherry picked from commit 89721e6)
* fix race condition in beat LoadMeta (cherry picked from commit 89721e6)
* fix race condition in beat LoadMeta (cherry picked from commit 89721e6) Co-authored-by: Lee E Hinman <[email protected]>
Proposed commit message
Fix race condition in beat
LoadMeta
function. If 2 (or more) beats had the same path to the meta file, then it was possible for one not to start. This would only affect beat receivers because a normal beat requires a unique path to the meta file.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs